<template>
	<view class="page">
		<WaterfallsFlow :wfList='list' @itemTap="itemTap" />

	</view>
</template>

<script>
	import WaterfallsFlow from '../../../components/WaterfallsFlow/WaterfallsFlow.vue'
	import Api from "../../../API/api";
	export default {
		components: {
			WaterfallsFlow
		},
		data() {
			return {

				list: [{
					url: "/static/index.png"
				}]
			}
		},
		methods: {
			getlist() {
				Api.getposter({
					type: false
				}).then(res => {
					console.log(res);
					if (res.code === 0) {
						this.list = res.data
					}
				})
			},
			itemTap(e) {
				console.log("预览", e);
			}
		},
		onLoad() {
      uni.setStorageSync("type","USER")
		},
		onShow() {
		  this.getlist()
		}

	}
</script>

<style lang="scss" scoped>
	.page {
		min-height: 100vh;
		background: #eee;
	}

	.sea {
		z-index: 100;
		position: fixed;
		top: 0;
		text-align: center;
		background-color: #fff;
		width: 100%;
		height: 100%;

		img {
			max-width: 100%;
			max-height: 100%;
			min-width: 70%;
		}

		.title {
			font-weight: 700;
			background-color: #eee;
			padding: 20rpx 0;
		}

		.btn {
			background-color: coral;
			width: 50%;
			padding: 30rpx;
			border-radius: 50rpx;
			position: absolute;
			bottom: 100rpx;
			left: 50%;
			transform: translateX(-50%);
		}
	}
</style>